home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Champak Vol C-14
/
Vol C-14.iso
/
games
/
vaquinha.swf
/
scripts
/
frame_22
/
DoAction_2.as
next >
Wrap
Text File
|
2012-04-23
|
5KB
|
227 lines
if(!paused)
{
rxv = 0;
i = 1;
while(i < objekte + 1)
{
tellTarget("h" add i)
{
y = _Y;
if(-50 >= y)
{
if(_root.i == 3)
{
_root.scores += 1;
}
_X = (random(26) + 4) * 15;
_Y = 550;
rot = random(110);
if(6 < rot and rot < 30)
{
mod = 2;
gotoAndStop(2);
}
else if(32 < rot and rot < 41)
{
mod = 3;
gotoAndStop(3);
}
else if(47 < rot and rot < 51)
{
mod = 5;
gotoAndStop(6);
}
else if(52 < rot and rot < 59)
{
mod = 6;
gotoAndStop(7);
}
else if(92 < rot)
{
mod = 100;
gotoAndStop(8);
}
else
{
mod = 1;
gotoAndStop(1);
}
}
else
{
_Y = y - _root.upv;
_rotation = 0;
}
}
i += 1;
}
if(a < 0 and -19 < a)
{
a = dropspeed;
}
clipping = false;
y = getProperty("b", _Y);
x = getProperty("b", _X);
w = 28.5;
h = 21.5;
i = 1;
while(i < objekte + 1)
{
sy = getProperty("h" add i, _Y);
sx = getProperty("h" add i, _X);
sw = 59;
sh = 9.5;
if(sx - sw - w < x and x < sx + sw + w and sy - sh >= y - rof + h and y - rof + h >= sy - sh - 2 * a)
{
clipping = true;
setProperty("b", _Y, sy - sh - h - 1);
y = sy - sh - h - 1;
type = eval("h" add i add ".mod");
if(2 >= type)
{
set("h" add i add ".mod",0);
}
if(type < 100)
{
b._rotation = 0;
_root.rof = 0;
_root.rta = false;
}
if(type == 1)
{
health += Number(12);
}
else if(type == 2)
{
health -= 36;
if(b._currentframe == 1)
{
b.gotoAndPlay(3);
}
else if(b._currentframe == 2)
{
b.gotoAndPlay(13);
}
}
else if(type == 5 or type == 7)
{
if(type == 5)
{
pre = true;
type = 7;
health += Number(12);
}
rxv = laufbandspeed;
}
else if(type == 6 or type == 8)
{
if(type == 6)
{
pre = true;
type = 8;
health += Number(12);
}
type = 8;
rxv = - laufbandspeed;
}
else if(type == 3)
{
health += 2;
}
else if(type == 4)
{
health += Number(12);
a = -20;
jumpmode = true;
}
else if(type >= 100)
{
if(type == 100)
{
r = 0;
health += Number(12);
}
tellTarget("h" add i)
{
r = _root.x - _X;
if(r != 0)
{
_rotation = r * 0.25;
_root.rof = r / Math.atan(_rotation) / 2;
if(_rotation < 0)
{
_root.b._rotation = _rotation;
_root.rxv = (- _root.rof) / 3;
}
else
{
_root.b._rotation = _rotation;
_root.rxv = _root.rof / 3;
}
}
}
}
}
else if(a < 0)
{
clipping = true;
}
i += 1;
}
if(clipping)
{
if(type != 4)
{
a = - upv;
}
braker = 0.8;
}
else
{
braker = kollbrake;
rof = 0;
if(0 < a)
{
a *= gforce;
}
b._rotation -= b._rotation / 10;
pre = false;
}
if(jumpmode)
{
a *= 0.85;
test = "JA";
if(-3.5 < a)
{
a = 3.5;
jumpmode = false;
}
}
if(0 >= y - h)
{
a = dropspeed;
setProperty("b", _Y, y + 5);
health -= 24;
}
setProperty("b", _Y, y + a);
setProperty("b", _X, x + xv + rxv);
xv *= braker;
b._y += _root.rof;
if(550 + h < y)
{
health = 0;
}
if(0 >= health)
{
gotoAndPlay(loserframe);
}
else if(100 < health)
{
health = 100;
}
}
else
{
_level1000._visible = true;
}